#all
all: PanberryMain PanberryServer PanberryInput PanberryRotation PanberryPhoto PanberryPano

#main
PanberryMain: PanberryMain.o
	gcc -o ../PanberryMain  PanberryMain.o	 -levent -lgphoto2

PanberryMain.o: PanberryMain.c 
	gcc -c PanberryMain.c 

#server
PanberryServer:  PanberryServer.o serverCommands.o 
	gcc -o ../PanberryServer PanberryServer.o serverCommands.o

PanberryServer.o: PanberryServer.c 
	gcc -c PanberryServer.c

serverCommands.o: serverCommands.c 
	gcc -c serverCommands.c

#input
PanberryInput: PanberryInput.o
	gcc -o ../PanberryInput PanberryInput.o

PanberryInput.o: PanberryInput.c 
	gcc -c PanberryInput.c

#rotate
PanberryRotation: PanberryRotation.o
	gcc -o ../PanberryRotation PanberryRotation.o
PanberryRotation.o: PanberryRotation.c 
	gcc -c PanberryRotation.c

#photo
PanberryPhoto: PanberryPhoto.o
	gcc -o ../PanberryPhoto PanberryPhoto.o -lgphoto2
PanberryPhoto.o: PanberryPhoto.c 
	gcc -c PanberryPhoto.c 

#pano
PanberryPano: PanberryPano.o
	gcc -o ../PanberryPano PanberryPano.o
PanberryPano.o: PanberryPano.c 
	gcc -c PanberryPano.c

#clean
.PHONY clean:
	rm *.o
	
